package com.lzy.huijinjiazu.di.module;

import com.jess.arms.di.scope.ActivityScope;

import dagger.Module;
import dagger.Provides;

import com.lzy.huijinjiazu.mvp.contract.MyAssetsContract;
import com.lzy.huijinjiazu.mvp.model.MyAssetsModel;


@Module
public class MyAssetsModule {
    private MyAssetsContract.View view;

    /**
     * 构建MyAssetsModule时,将View的实现类传进来,这样就可以提供View的实现类给presenter
     *
     * @param view
     */
    public MyAssetsModule(MyAssetsContract.View view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    MyAssetsContract.View provideMyAssetsView() {
        return this.view;
    }

    @ActivityScope
    @Provides
    MyAssetsContract.Model provideMyAssetsModel(MyAssetsModel model) {
        return model;
    }
}